package cn.wsalix.sys.repository;

import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import cn.anlaser.repository.CommonRepository;
import cn.anlaser.status.DataEnum;
import cn.wsalix.sys.entity.VerifyCode;

public interface VerifyCodeRepository extends CommonRepository<VerifyCode> {
	@Modifying(clearAutomatically = true)
	@Query("update VerifyCode set status =:status where phone =:phone")
	void disableByPhone(@Param("status") DataEnum status,
			@Param("phone") String phone);

}
